package com.example.administrator.yiroote.activity;


import android.app.Dialog;
import android.content.Context;
import android.content.Intent;

import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageButton;

import com.example.administrator.yiroote.R;
import com.example.administrator.yiroote.dialog.AlterDielog;
import com.example.administrator.yiroote.dialog.coustomDialog;


public class LoginActivity extends AppCompatActivity {

    private Button btn_login;
    private Button btn_register;
    private ImageButton imgbtn_qq;
    private ImageButton imgbtn_wechat;
    private ImageButton imgbtn_weibo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_login);
        initViews();
        initEvents();
    }
    public void initViews(){
        btn_login=(Button)findViewById(R.id.Btn_Login);
        btn_register=(Button)findViewById(R.id.Btn_Register);
        imgbtn_qq=(ImageButton)findViewById(R.id.ImgBtn_QQ);
        imgbtn_wechat=(ImageButton)findViewById(R.id.ImgBtn_WeChat);
        imgbtn_weibo=(ImageButton)findViewById(R.id.ImgBtn_Weibo);
    }
    public void initEvents(){
        btn_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(LoginActivity.this, HomeActivity.class);
                startActivity(intent);

            }
        });
        btn_register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlterDielog alterDielog=new AlterDielog();
                alterDielog.testDialog(LoginActivity.this);

            }
        });

    }
    public  void initDatas(){

    }
}
